var SoftRenderer;
(function (SoftRenderer) {
    var Engine = (function () {
        function Engine() {
        }
        Engine.prototype.loadJsonDataAsync = function (url, success, failed) {
            var xhr = new XMLHttpRequest();
            xhr.open("GET", url, true);
            xhr.onreadystatechange = function () {
                if (xhr.readyState == 4 && xhr.status == 200) {
                    var jsonObject = JSON.parse(xhr.responseText);
                    success(jsonObject);
                }
                else {
                    failed();
                }
            };
            xhr.send(null);
        };
        return Engine;
    })();
    SoftRenderer.Engine = Engine;
})(SoftRenderer || (SoftRenderer = {}));
